<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>产品信息</title>
</head>
<body>
	<div class="modal fade" id="productDialog" role="dialog"
		aria-labelledby="productDialogLabel" aria-hidden="true">
		<form id="productDetail" method="post" name="productDetail">
			<div class="modal-dialog" tabindex="0">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">
							<span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">产品信息</h4>
						<input type="hidden" id="proId" required name="id"
							value="${product.id}" />
					</div>
					<div class="modal-body">
						<div align="left">
							<div align="center">
								<!--选项卡-->
								<div class="container-fluid">
									<div class="row-fluid">
										<div class="span12">
											<div class="tabbable" id="tabs-234974">
												<ul class="nav nav-tabs">
													<li class="active"><a href="#baseInfor"
														data-toggle="tab">产品信息</a></li>
												</ul>
												<div class="tab-content">
													<div class="tab-pane active" id="baseInfor">
														<table class="table table-bordered">
															<tr>

																<td style="text-align: right; width: 100px;">产品编号:</td>
																<td><input style="width: 100px;" type="text"
																	id="proCode" required name="proCode"
																	value="${product.proCode}" readonly="readonly" /></td>
																<td style="text-align: right; width: 100px;">产品名称:</td>
																<td><input style="width: 100px;" type="text"
																	id="proName" required name="proName"
																	value="${product.proName}" /></td>
															</tr>
															<tr>
																<td style="text-align: right; width: 100px;">产地:</td>
																<td colspan="3"><input style="width: 100%;"
																	type="text" id="grown" required name="grown"
																	value="${product.grown}" /></td>
															</tr>
															<tr>
																<td style="text-align: right; width: 100px;">产品分类:</td>
																<td style="text-align: right; width: 100px;">
																<select id="typeId" required
																	name="typeId">
																	<option value="-1">请选择</option>
																		<c:forEach var="proType" items="${proTypes}">
																			<option
																				<c:if test="${proType.id==product.typeId}">selected</c:if>
																				value="${proType.id}">${proType.typeName}</option>
																		</c:forEach>
																</select> 
																</td>
																<td style="text-align: right; width: 120px;">是否为样品:</td>
																<td>
																<input type="hidden" id="isdemo" required name="isdemo"
																	value="${product.isdemo}" />
															
																<select id="productStatus" required 
																	name="productStatus">
																		<c:forEach var="isdemo" items="${productStatus}">
																			<option
																				<c:if test="${isdemo.key==product.isdemo}">selected</c:if>
																				value="${isdemo.key}">${isdemo.val}</option>
																		</c:forEach>
																</select> 
																
																	</td>
															</tr>
															<tr>
																<td style="text-align: right; width: 100px;">厂商:</td>
																<td><input style="width: 100px;" type="text"
																	id="factory" name="factory" value="${product.factory}" /></td>
																<td style="text-align: right; width: 100px;">最小单位:</td>
																<td><input style="width: 100px;" type="text"
																	id="unit" name="unit" value="${product.unit}" /></td>
															</tr>
															<tr>
																<td style="text-align: right; width: 100px;">主图片:</td>
																<td colspan="4"><input style="width: 400px;"
																	type="file" id="pic" name="pic" required
																	value="${product.pic}" /></td>

															</tr>
															<tr>
																<td style="text-align: right;">备注:</td>
																<td colspan="4"><textarea style="width: 400px;"
																		name="description" id="description">
															${product.description}
															</textarea></td>
															</tr>
														</table>
													</div>
											
												</div>

											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="optBtn" class="modal-footer">
						<button id="saveBtn" type="button" class="btn btn-primary">保存</button>
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>

			</div>
		</form>
	</div>


</body>
</html>